package com.feicheng.iou.mapper;

import com.feicheng.iou.entity.ReservationBackview;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.feicheng.iou.pojo.statisticsInfoPOJO.ReservationBackviewAndNamePOJO;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Set;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author tianchunlei
 * @since 2021-06-28
 */
public interface ReservationBackviewMapper extends BaseMapper<ReservationBackview> {

    /**
     * @Author wuweinan
     * @Description  查询出对应用户预约回访总条数
     * @Date 2021-8-9 17:19
     * @param autorId
     * @return autorId
     */
    Integer statisticsReservationBackviewCount(@Param("searchStartTime") LocalDateTime searchStartTime,
                                               @Param("searchEndTime") LocalDateTime searchEndTime,
                                               @Param("autorId") Integer autorId);

    /**
     * @Author wuweinan
     * @Description  统计今日待回访条数
     * @Date 2021-8-9 17:19
     * @param autorId
     * @return autorId
     */
    Integer statisticsTodayUnHandleBackview(@Param("todayStart") LocalDateTime toDayStart,
                                            @Param("todayEnd") LocalDateTime toDayEnd,
                                            @Param("autorId") Integer autorId);

    /**
     * @Author wuweinan
     * @Description  统计今日预约回访的学生Id
     * @Date 2021-8-9 17:19
     * @param autorId
     * @return autorId
     */
    List<Integer> statisticsTodayUnHandleBackviewStudentIdList(@Param("todayStart") LocalDateTime toDayStart,
                                                               @Param("todayEnd") LocalDateTime toDayEnd,
                                                               @Param("autorId") Integer autorId);


    /**
     * @Author wuweinan
     * @Description  统计今日回访
     * @Date 2021-8-9 17:19
     * @param autorId
     * @return autorId
     */
    List<Integer> statisticsTodayBackviewStudentIdList(@Param("todayStart") LocalDateTime toDayStart,
                                                       @Param("todayEnd") LocalDateTime toDayEnd,
                                                       @Param("autorId") Integer autorId);

    /**
     * @Author wuweinan
     * @Description  自己的差集今日预约回访
     * @Date 2021-8-9 17:19
     * @param studentIdSet
     * @return autorId
     */
    List<ReservationBackviewAndNamePOJO> statisticsTodayUnHandleBackviewList(
                                                                             @Param("page") Integer page,
                                                                             @Param("size") Integer size,
                                                                             @Param("todayStart") LocalDateTime toDayStart,
                                                                             @Param("todayEnd") LocalDateTime toDayEnd,
                                                                             @Param("studentIdSet") Set<Integer> studentIdSet,
                                                                             @Param("autorId") Integer autorId );


    /**
     * @Author wuweinan
     * @Description  自己的差集今日预约回访的数量
     * @Date 2021-8-9 17:19
     * @param studentIdSet
     * @return autorId
     */
    Integer statisticsTodayUnHandleBackviewCount( @Param("todayStart") LocalDateTime toDayStart,
                                                  @Param("todayEnd") LocalDateTime toDayEnd,
                                                  @Param("studentIdSet") Set<Integer> studentIdSet,
                                                  @Param("autorId") Integer autorId );






    /**
     * @Author wuweinan
     * @Description  所有人的预约回访差集回访默认今日
     * @Date 2021-8-9 17:19
     * @param
     * @return autorId
     */
    List<ReservationBackviewAndNamePOJO> statisticsAllTodayUnHandleBackviewList(
                                                                                 @Param("page") Integer page,
                                                                                 @Param("size") Integer size,
                                                                                 @Param("autorIdList") List<Integer> autorIdList,
                                                                                 @Param("studentIdSetList") List<List<Integer>>  studentIdSetList
                                                                                 );

    /**
     * @Author wuweinan
     * @Description  所有人的预约回访差集回访默认今日的数量!
     * @Date 2021-8-9 17:19
     * @param
     * @return autorId
     */
     Integer statisticsAllTodayUnHandleBackviewCount(
                                                    @Param("autorIdList") List<Integer> autorIdList,
                                                    @Param("studentIdSetList") List<List<Integer>>  studentIdSetList);





}
